package com.dream.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

/**
 * 课排表
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "sys_classplant")
public class Sys_ClassPlant extends AllId implements Serializable
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private SysUser sysUser;// 哪个老师

	private Sys_Room sys_Room;// 哪个教室 ----

	private Sys_Class sys_Class;// 哪个年级树上面的

	private Long timeStart;// 时间开始
	
	private Long timeEnd;// 时间结束

	private String timeStartShow; // 显示开始时间

	private String timeEndShow;// 结束开始时间

	private String state;//是否完成;
	
	private String week;
	
	private String year;//上的周期，这里表示，一年，只能有一次上相同的都是，相同的课
	
	private Sys_LearnPlant sys_LearnPlant;//上的什么课
	
	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade(CascadeType.PERSIST)
	public SysUser getSysUser()
	{
		return sysUser;
	}

	public void setSysUser(SysUser sysUser)
	{
		this.sysUser = sysUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade(CascadeType.PERSIST)
	public Sys_Room getSys_Room()
	{
		return sys_Room;
	}

	public void setSys_Room(Sys_Room sys_Room)
	{
		this.sys_Room = sys_Room;
	}

	public Long getTimeStart()
	{
		return timeStart;
	} 
	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public void setTimeStart(Long timeStart)
	{
		this.timeStart = timeStart;
	}

	public Long getTimeEnd()
	{
		return timeEnd;
	}

	public void setTimeEnd(Long timeEnd)
	{
		this.timeEnd = timeEnd;
	}

	public String getTimeStartShow()
	{
		return timeStartShow;
	}

	public void setTimeStartShow(String timeStartShow)
	{
		this.timeStartShow = timeStartShow;
	}

	public String getTimeEndShow()
	{
		return timeEndShow;
	}

	public void setTimeEndShow(String timeEndShow)
	{
		this.timeEndShow = timeEndShow;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade(CascadeType.PERSIST)
	public Sys_Class getSys_Class()
	{
		return sys_Class;
	}

	public void setSys_Class(Sys_Class sys_Class)
	{
		this.sys_Class = sys_Class;
	}

	public String getWeek() {
		return week;
	}

	public void setWeek(String week) {
		this.week = week;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade(CascadeType.PERSIST)
	public Sys_LearnPlant getSys_LearnPlant() {
		return sys_LearnPlant;
	}

	public void setSys_LearnPlant(Sys_LearnPlant sys_LearnPlant) {
		this.sys_LearnPlant = sys_LearnPlant;
	}
}
